package com.archie.zhufengfm.tasks;

import android.os.AsyncTask;

/**
 * Created by Archie on 2015/10/20.
 */
public abstract class BaseTask extends AsyncTask<String, Void, TaskResult> {

    private TaskCallback callback;

    public BaseTask(TaskCallback callback) {
        this.callback = callback;
    }

    @Override
    protected void onPostExecute(TaskResult result) {
        if (callback != null) {
            callback.onTaskFinished(result);
        }
    }
}
